import { axios } from '@/utils/request'

/**
 * 分页查询采集端样本
 *
 * @author ssy
 * @date 2022/02/16 10:59
 */
export function page (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/page',
    method: 'get',
    params: parameter
  })
}

// 分页查询采集端网关通道样本
export function pageList (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/pageList',
    method: 'get',
    params: parameter
  })
}

/**
 * 增加采集端样本
 *
 * @author ssy
 * @date 2022/02/16 10:59
 */
export function add (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑采集端样本
 *
 * @author ssy
 * @date 2022/02/16 10:59
 */
export function edit (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 查看详情采集端样本
 *
 * @author ssy
 * @date 2022/02/16 10:59
 */
export function detail (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/detail',
    method: 'get',
    params: parameter
  })
}

/**
 * 删除采集端样本
 *
 * @author ssy
 * @date 2022/02/16 10:59
 */
export function del (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/delete',
    method: 'post',
    data: parameter
  })
}

export function deleteByGatewayAndChannel (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/deleteByGatewayAndChannel',
    method: 'post',
    data: parameter
  })
}

export function collectionSampleManageList (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/list',
    method: 'get',
    params: parameter
  })
}

// 注册故障
export function registerModel (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/registerModel',
    method: 'post',
    data: parameter
  })
}

// 注册正样本
export function registerNormalModel (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/registerNormalModel',
    method: 'post',
    data: parameter
  })
}

// 查询远程任务响应
export function queryTask (parameter) {
  return axios({
    url: '/bizCollectionSampleManage/queryTask',
    method: 'get',
    params: parameter
  })
}

